﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TheAPI.Data
{
    public class Talent
    {
        public override bool Equals(object obj)
        {
            var other = obj as Talent;
            return other != null && other.Id == Id && other.Rank == Rank;
        }

        public override int GetHashCode()
        {
            return Id.GetHashCode() + Rank.GetHashCode();
        }

        /// <summary>
        /// Talent id
        /// </summary>
        [JsonProperty("id")]
        public int Id { get; set; }

        /// <summary>
        /// Talent name
        /// </summary>
        [JsonProperty("name")]
        public string Name { get; set; }

        /// <summary>
        /// Talent rank
        /// </summary>
        [JsonProperty("rank")]
        public int Rank { get; set; }
    }
}
